#ifndef PLAYBACKPROGRESS_H
#define PLAYBACKPROGRESS_H

#include <QSlider>
#include <QStyleOptionSlider>
#include <QPainter>
#include <QMouseEvent>
#include <QApplication>
#include <QStyle>

class PlaybackProgress : public QSlider {
    Q_OBJECT
public:
    enum Theme {
        DefaultBlue,    // 默认蓝色主题
        NeonBlue,       // 霓虹蓝主题
        IceBlue,        // 冰蓝主题
        DeepOcean       // 深海蓝主题
    };

    explicit PlaybackProgress(QWidget *parent = nullptr);

    // 应用主题
    void applyTheme(Theme theme);

    // 获取当前主题
    Theme getCurrentTheme();

protected:
    void mouseMoveEvent(QMouseEvent *event) override;

    void leaveEvent(QEvent *event) override;

    void mousePressEvent(QMouseEvent *event) override;

    void mouseReleaseEvent(QMouseEvent *event) override;

    void paintEvent(QPaintEvent *event) override;

private:
    void applyDefaultBlueStyle();

    void applyNeonBlueStyle();

    void applyIceBlueStyle();

    void applyDeepOceanStyle();

private:
    bool hovered;
    bool pressed;
    Theme currentTheme;
};


#endif // PLAYBACKPROGRESS_H
